package edu.cuit.zhuyimeng.aircraft.api.controller;

import edu.cuit.zhuyimeng.aircraft.api.dto.AircraftInfoDTO;
import edu.cuit.zhuyimeng.framework.common.result.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 飞机查询控制器API
 */
@FeignClient(value = "aircraft-service",contextId = "aircraft-query",path = "/aircraft")
public interface AircraftQueryController {

    /**
     *  查询飞机信息
     * @param id 飞机ID
     */
    @GetMapping("/")
    CommonResult<AircraftInfoDTO> getAircraftInfo(@RequestParam("id") Long id);

    /**
     * 查询飞机列表
     */
    @GetMapping("/list")
    CommonResult<List<AircraftInfoDTO>> getAircraftList(@RequestParam("page") Long page);

}
